var express = require('express');
var app = express();

app.use(express.urlencoded({ extended: false }))

// 当对主页发出 GET 请求时，响应“hello world”
app.get('/', function (req, res) {
    res.send('hello world');
});


app.post('/login', function (req, res) {
    console.log(req.body)
    res.send('login msg');
});


app.get('/reg', function (req, res) {
    res.send('reg msg');
});


app.listen(7788, () => {
    console.log('服务器启动了： http://localhost:7788')
})